#pragma once
#pragma warning (disable : 4251 )

#include "MessengerEventBase.h"
#include "rendering/ISceneNode.h"
#include "../util/Shared_ptr.h"



namespace Boon
{

	class BOON_API Event_RenderComp_Created : public MessengerEventBase
	{
	public:
		Event_RenderComp_Created( Renderer& r , const Rendering::ISceneNodeStrong& newNode );
		~Event_RenderComp_Created();
		static const EventType				ID = 0xb262ece3;

		virtual const EventType				GetEventID() const;

		virtual void						Serialize( std::ostream& out ) const;

		virtual IMessengerEventStrong		Copy() const;

		virtual const char*					GetName() const;

		inline Renderer&					GetRenderer() { return m_Renderer; }
		const Rendering::ISceneNodeStrong&	GetNewNode() const{ return m_NewNode; }		

	//private: todo set private and remove ugly texturenode-observer-draw
	private:
		Renderer&							m_Renderer;
		Rendering::ISceneNodeStrong			m_NewNode;
	};

}
